/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2023 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32g0xx_ll_adc.h"
#include "stm32g0xx_ll_dma.h"
#include "stm32g0xx_ll_rcc.h"
#include "stm32g0xx_ll_bus.h"
#include "stm32g0xx_ll_system.h"
#include "stm32g0xx_ll_exti.h"
#include "stm32g0xx_ll_cortex.h"
#include "stm32g0xx_ll_utils.h"
#include "stm32g0xx_ll_pwr.h"
#include "stm32g0xx_ll_tim.h"
#include "stm32g0xx_ll_usart.h"
#include "stm32g0xx_ll_gpio.h"

#if defined(USE_FULL_ASSERT)
#include "stm32_assert.h"
#endif /* USE_FULL_ASSERT */

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define KEY1_Pin LL_GPIO_PIN_13
#define KEY1_GPIO_Port GPIOC
#define VBAT_ADC_Pin LL_GPIO_PIN_0
#define VBAT_ADC_GPIO_Port GPIOA
#define MADC_Pin LL_GPIO_PIN_4
#define MADC_GPIO_Port GPIOA
#define EC11_A_Pin LL_GPIO_PIN_5
#define EC11_A_GPIO_Port GPIOA
#define EC11_B_Pin LL_GPIO_PIN_6
#define EC11_B_GPIO_Port GPIOA
#define RADC1_Pin LL_GPIO_PIN_7
#define RADC1_GPIO_Port GPIOA
#define RADC2_Pin LL_GPIO_PIN_0
#define RADC2_GPIO_Port GPIOB
#define RADC3_Pin LL_GPIO_PIN_1
#define RADC3_GPIO_Port GPIOB
#define bspIIC_SCL_Pin LL_GPIO_PIN_2
#define bspIIC_SCL_GPIO_Port GPIOB
#define OLED_SCL_Pin LL_GPIO_PIN_10
#define OLED_SCL_GPIO_Port GPIOB
#define OLED_SDA_Pin LL_GPIO_PIN_11
#define OLED_SDA_GPIO_Port GPIOB
#define bspIIC_SDA_Pin LL_GPIO_PIN_12
#define bspIIC_SDA_GPIO_Port GPIOB
#define EC11_KEY_Pin LL_GPIO_PIN_13
#define EC11_KEY_GPIO_Port GPIOB
#define KEY2_Pin LL_GPIO_PIN_14
#define KEY2_GPIO_Port GPIOB
#define KEY3_Pin LL_GPIO_PIN_15
#define KEY3_GPIO_Port GPIOB
#define IN_SW1_Pin LL_GPIO_PIN_8
#define IN_SW1_GPIO_Port GPIOA
#define IN_SW2_Pin LL_GPIO_PIN_6
#define IN_SW2_GPIO_Port GPIOC
#define IN_SW3_Pin LL_GPIO_PIN_7
#define IN_SW3_GPIO_Port GPIOC
#define BEEP_Pin LL_GPIO_PIN_11
#define BEEP_GPIO_Port GPIOA
#define IN_SW4_Pin LL_GPIO_PIN_12
#define IN_SW4_GPIO_Port GPIOA
#define MB_STEP_Pin LL_GPIO_PIN_0
#define MB_STEP_GPIO_Port GPIOD
#define MB_DIR_Pin LL_GPIO_PIN_1
#define MB_DIR_GPIO_Port GPIOD
#define MB_EN_Pin LL_GPIO_PIN_2
#define MB_EN_GPIO_Port GPIOD
#define TC_PR_Pin LL_GPIO_PIN_3
#define TC_PR_GPIO_Port GPIOD
#define TC_ST_Pin LL_GPIO_PIN_3
#define TC_ST_GPIO_Port GPIOB
#define MOTOR_IN1_Pin LL_GPIO_PIN_4
#define MOTOR_IN1_GPIO_Port GPIOB
#define MOTOR_IN2_Pin LL_GPIO_PIN_5
#define MOTOR_IN2_GPIO_Port GPIOB
#define TCA9555_CLK_Pin LL_GPIO_PIN_6
#define TCA9555_CLK_GPIO_Port GPIOB
#define TCA9555_SDA_Pin LL_GPIO_PIN_7
#define TCA9555_SDA_GPIO_Port GPIOB
#define VBAT_EN_Pin LL_GPIO_PIN_8
#define VBAT_EN_GPIO_Port GPIOB
#define LED_RUN_Pin LL_GPIO_PIN_9
#define LED_RUN_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
